import request from '@/utils/request'

// 查询企业信息列表
export function listTaxTerritory(query) {
  return request({
    url: '/system/tax_territory/list',
    method: 'get',
    params: query
  })
}

export function getSettlementList(query) {
  return request({
    url: '/system/tax_territory/getSettlementList',
    method: 'get',
    params: query
  })
}



// 查询企业信息详细
export function getTaxTerritory(organizationId) {
  return request({
    url: '/system/tax_territory/' + organizationId,
    method: 'get'
  })
}

// 新增企业信息
export function addTaxTerritory(data) {
  return request({
    url: '/system/tax_territory',
    method: 'post',
    data: data
  })
}

// 新增企业信息
export function addSettlement(data) {
  return request({
    url: '/system/tax_territory/settlementAdd',
    method: 'post',
    data: data
  })
}



// 修改企业信息
export function updateTaxTerritory(data) {
  return request({
    url: '/system/tax_territory',
    method: 'put',
    data: data
  })
}

// 删除企业信息
export function delTaxTerritory(organizationId) {
  return request({
    url: '/system/tax_territory/' + organizationId,
    method: 'delete'
  })
}

// 删除企业信息
export function getAuthenticationUrl(organizationId) {
  return request({
    url: '/system/tax_territory/getAuthenticationUrl/' + organizationId,
    method: 'get'
  })
}

// 删除企业信息
export function getSettlementQuery(organizationId) {
  return request({
    url: '/system/tax_territory/get_settlement_query/' + organizationId,
    method: 'get'
  })
}

// 修改企业信息
export function updateSettlement(data) {
  return request({
    url: '/system/tax_territory/settlementEdit',
    method: 'put',
    data: data
  })
}

// 查询合同数据
export function listContractSigning(query) {
  return request({
    url: '/system/tax_territory/contractSigningList',
    method: 'get',
    params: query
  })
}

// 用户密码重置
export function resetUserPwd(organizationId, password) {
  const data = {
    organizationId,
    password
  }
  return request({
    url: '/system/tax_territory/resetPwd',
    method: 'put',
    data: data
  })
}
